package com.itheima.homework;

public class Phone {
    public static void main(String[] args) {
        TestPhone p = new TestPhone();
        p.setBrand("小米");
        p.setColor("黑色");
        p.setPrice(3998);
        p.call();
        p.sendMessage();

        TestPhone t2 = new TestPhone("小米",3998,"黑色");
        p.call();
        p.sendMessage();
    }
}

class TestPhone{
    private String brand;
    private int price;
    private  String color;

    public TestPhone(){}

    public TestPhone(String brand,int price,String color){
    }

    public void setBrand(String brand){
        this.brand = brand;
    }

    public String getBrand(){return brand;}


    public void setColor(String color){
        this.color = color;
    }

    public String getColor(){return color;}


    public void setPrice(int price){
        this.price = price;
    }

    public int getPrice(){return price;}

    public void call(){
        System.out.println("正在使用价格为" + price + "元" + color + "的" + brand + "手机打电话...");
    }

    public void sendMessage(){
        System.out.println("正在使用价格为" + price + "元" + color + "的" + brand + "手机发短信...");
    }
}